<?php
declare(strict_types=1);

namespace SixShop\Message\Hook;


use PHPUnit\Framework\TestCase;
use think\Event;

class SendNotificationsHookTest extends TestCase
{
    protected SendNotificationsHook $sendNotifications;
    protected Event $event;

    protected function setUp(): void
    {
        $this->event = app()->get('event');
        $this->sendNotifications = app(SendNotificationsHook::class);

    }

    public function testHandle(): void
    {
        $this->event->trigger('message.send_notifications', [
            [
                'user_id' => 1,
                'title' => 'test',
                'content' => 'test',
                'type' => 5,
                'template_code' => 'fasfsad',
                'template_context' => ['abd'=>123],
            ]
        ]);
    }
}